<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>用户注册</title>
</head>
<body>
	<form action="reg.php" method="post">
		<div>
			<label>用户名</label>
			<input type="text" name="username">
		</div>
		<div>
			<label>密码<label>
			<input type="password" name="pswd">
		</div>
		<div>
			<label>验证码</label>
			<input type="text" name="vcode">
			<img id="auth_img" src="auth.php">
		</div>
		<input type="submit">
	</form>

	<script type="text/javascript">
		// 点击切换验证码
		var authImg=document.getElementById('auth_img');
		authImg.onclick=function(){
			this.setAttribute('src','auth.php');
		}
	</script>
</body>
</html>